<template>
<div class="wrapper tag-item"> 
   <div class="fl left-list"> 

    <div class="job-position"> 
     <div class="job-type reco-job"> 
      <div class="head"> 
       <h4 class="title pull-left">推荐职位</h4> 
       <span class="more pull-right"><a href="#">更多职位推荐&nbsp;&nbsp;<i class="fa fa-angle-right" aria-hidden="true"></i></a></span> 
       <div class="clearfix"></div> 
      </div> 
      <ul class="yui3-g job-list" style="display:block;"> 
       <li v-for="(item,index) in com" :key="index" class="yui3-u-1-2 job-item"> 
           <p><span class="name">
               <a :href="`/recruit/item/${item.id}`">{{item.jobname}}</a></span><span class="city"><i class="fa fa-map-marker"></i> {{item.address}}</span></p> <p class="need"><span class="money">15K-25K</span>/{{item.condition}}/本科及以上/全职</p> <p><span class="company">百度 &middot; 6天前</span></p> </li> 
      </ul> 
     </div> 
     <div class="job-type latest-job"> 
      <div class="head"> 
       <h4 class="title pull-left">最新职位</h4> 
       <span class="more pull-right"><a href="#">更多职位推荐&nbsp;&nbsp;<i class="fa fa-angle-right" aria-hidden="true"></i></a></span> 
       <div class="clearfix"></div> 
      </div> 
      <ul class="yui3-g job-list" style="display:block;"> 
       <li v-for="(item,index) in new1" :key="index" class="yui3-u-1-2 job-item"> <p><span class="name"> <a href="~/assets/recruit-jobDetail.html" target="_blank">{{item.jobname}}</a></span><span class="city"><i class="fa fa-map-marker"></i> {{item.address}}</span></p> <p class="need"><span class="money">15K-25K</span>/经验3-5年/本科及以上/全职</p> <p><span class="company">百度 &middot; 6天前</span></p> </li> 
      </ul> 
     </div> 
    </div> 
   </div> 
   <div class="fl right-tag"> 
    <div class="hot-company"> 
     <p class="mail">提交收录请发邮件至ccccccc@qq.com</p> 
     <div class="company"> 
      <div class="head"> 
       <h4>热门企业</h4> 
      </div> 
      <ul class="yui3-g company" style="display:block;"> 
       <li v-for="(item,index) in hot" :key="index" class="yui3-u-1-3 company-item"> 
           <p><img :src="`${item.logo}`" alt="" /></p> 
           <p class="title">{{item.name}}</p> 
           <p class="position"><a href="~/assets/recruit-company.html" target="_blank">{{item.jobcount}}个职位</a></p> </li> 
      </ul> 
     </div> 
    </div> 
   </div> 
   <div class="clearfix"></div> 
  </div> 
</template>

<script>
import enterpriseApi from "~/api/enterprise"
import recruitApi from "~/api/recruit"
import "~/assets/css/page-sj-recruit-index.css"
import axios from "axios"
export default {
    asyncData() {
        // enterpriseApi.hot();//热门企业
        // recruitApi.new();//最新职位
        // recruitApi.com();//推荐职位
        return axios.all([enterpriseApi.hot(), recruitApi.new(),recruitApi.com()])
            .then(axios.spread(function (res1,res2,res3) {
            // 两个请求现在都执行完成
            //console.log(res1.data)
            return {
                hot:res1.data.data,
                new1:res2.data.data,
                com:res3.data.data
            }
        }));
    }
}
</script>

<style>

</style>